home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1984 January to June / Ahoy_Magazine_84-Jan-Jun_1984_Double_L.d64 / multi-draw 64 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  13KB  |  316 lines

  1. 1 rem--ahoy--jan issue--multi-draw--prog page 38
  2. 3 rem make sure you raised basic by     typing  poke44,64:poke64*256,0:new
  3. 5 onagoto981,982,983
  4. 6 ifpeek(44)<>64thenprint"[147]basic has not been moved. restart !!!":list2-4
  5. 7 poke3846,226:poke53281,6:poke53280,14:poke178,0:poke179,16:print"[154]"
  6. 10 print"[147]             multi-draw 64"
  7. 15 print"             by: pete lobl"
  8. 16 print"            version 9/19/83"
  9. 20 print"please wait, reading in machine code..."
  10. 30 dimc$(15),ch%(11):p$="":fori=1to22:p$=p$+"":next:fori=0to15:readc$(i):next
  11. 40 fori=1to10:readx%(i),y%(i):next
  12. 50 c1=6:c2=2:c3=1:cc=1:k$="joy":k=0:p=1:pe$="dow":tb=14:mb=15:x=64:y=88:ce=6
  13. 60 pe=1:mv=1:fs$="fas":fs=1:pl=864:cl=3072:rv=3200:fl=3328:rj=3584:in=3712
  14. 65 poke2040,35:poke2041,39:poke2042,43:poke2043,47:poke53277,15:poke53271,4
  15. 67 fori=53287to53291:pokei,1:next:poke53264,7:cx=828:cy=829
  16. 68 fori=53248to53252step2:pokei,32:next
  17. 69 poke53251,128:poke53249,104:poke53253,170
  18. 70 gosub1000: rem read in ml
  19. 80 fori=1to63:reada:poke2240+i,a:next:poke2240,99
  20. 82 fori=0to63:reada:poke2496+i,a:next
  21. 84 fori=0to63:reada:poke2752+i,a:next
  22. 86 fori=0to63:reada:poke3008+i,a:next
  23. 88 fori=0to35:reada:poke4608+i,a:next
  24. 90 yc=53255:xc=53254:x1=6:y1=43
  25. 92 pokexc,x*2+x1:pokeyc,y+y1:sysin:poke53274,241:poke56334,0:syscl
  26. 93 poke689,tb:poke704,mb:poke53269,15:printp$"":gosub990:gosub840:poke53280,c1
  27. 94 poke848,cc:poke849,c1:poke850,c2:poke851,c3:poke53269,7
  28. 96 fori=0to175:pokecy,i:pokecx,0:syspl:pokecx,124:syspl:next
  29. 98 fori=0to124:pokecx,i:pokecy,0:syspl:pokecx,i:pokecy,175:syspl:next
  30. 99 poke53269,15:poke198,0:h=124:hy=175
  31. 100 ifkthen120
  32. 105 poke650,.:sysrj:a=peek(679):ifa=.then120
  33. 107 q=x%(a)*mv+x:r=y%(a)*mv+y:ifq>hthenq=q-h-1:goto109
  34. 108 ifq<.thenq=h+q+1
  35. 109 ifr>hythenr=r-hy-1:goto111
  36. 110 ifr<.thenr=hy+r+1
  37. 111 x=q:y=r:pokecx,x:pokecy,y:ifpethensyspl
  38. 112 iffs=0thengosub850
  39. 113 pokexc,x*2+x1:pokeyc,y+y1:goto100
  40. 120 geta$:ifa$=""then100
  41. 121 ifk=0then138
  42. 122 poke650,128:ifa$<>"i"then124
  43. 123 a=2:goto107
  44. 124 ifa$<>"u"then126
  45. 125 a=8:goto107
  46. 126 ifa$<>"j"then128
  47. 127 a=6:goto107
  48. 128 ifa$<>"n"then130
  49. 129 a=10:goto107
  50. 130 ifa$<>"m"then132
  51. 131 a=4:goto107
  52. 132 ifa$<>","then134
  53. 133 a=7:goto107
  54. 134 ifa$<>"k"then136
  55. 135 a=3:goto107
  56. 136 ifa$<>"o"then138
  57. 137 a=5:goto107
  58. 138 poke198,0:ifa$<>"-"then141
  59. 139 ifkthenk=0:k$="joy":gosub990:gosub840:goto100
  60. 140 k=1:k$="key":gosub990:gosub840:goto100
  61. 141 ifa$<>"e"then143
  62. 142 cc=0:poke848,0:gosub990:gosub840:goto100
  63. 143 ifa$="r"thensysrv:goto100
  64. 145 ifa$="[136]"thena=peek(704):a=(a+1)*-(a<15):poke704,a:goto100
  65. 146 ifa$="[140]"thena=peek(704):a=a-1:a=a+((sgn(a)=-1)*(-16)):poke704,a:goto100
  66. 147 ifa$="^"thena=peek(689):a=(a+1)*-(a<15):poke689,a:goto100
  67. 148 ifa$="*"thena=peek(689):a=a-1:a=a+((sgn(a)=-1)*(-16)):poke689,a:goto100
  68. 149 ifa$="/"thena=peek(53290):a=(a+1)*-(a<255):poke53290,a:goto100
  69. 150 ifa$="?"thena=peek(53290):a=a-1:a=a+((sgn(a)=-1)*(-256)):poke53290,a:goto100
  70. 153 ifa$<>"[205]"then156
  71. 154 iffsthenfs=0:fs$="slo":goto180
  72. 155 fs=1:fs$="fas":goto180
  73. 156 ifa$<>"+"then159
  74. 157 ifpeek(53269)=15thenpoke53269,7:goto100
  75. 158 poke53269,15:goto100
  76. 159 ifa$<>"p"then162
  77. 160 ifpethenpe=0:pe$="up ":gosub990:gosub840:goto100
  78. 161 pe=1:pe$="dow":gosub990:gosub840:goto100
  79. 162 ifa$<>""then164
  80. 163 syscl:gosub990:gosub840:goto90
  81. 164 ifa$<>"l"then166
  82. 165 gosub950:gosub990:gosub840:goto100
  83. 166 ifa$<>"s"then168
  84. 167 gosub900:gosub990:printp$"[145][145]":gosub840:goto100
  85. 168 ifa$<>"m"then170
  86. 169 gosub182:poke53269,0:gosub860:gosub870:poke3846,226:poke53269,15:goto184
  87. 170 ifa$<>"x"then200
  88. 171 poke53269,0:gosub860:print"[147]i hope you had fun, see ya' next time"
  89. 172 print"oh, why don't you experiment with"
  90. 173 print"location 3846. poke different numbers"
  91. 174 print"there.  you may not know it, but you'll"
  92. 175 print"be controlling the raster interrupt!!!"
  93. 176 print"till next time, have fun..............":end
  94. 180 gosub990:gosub840:goto100
  95. 182 printp$"             please wait               [146]"p$
  96. 183 a=5376:b=1024:c=2023:fori=btoc:pokea,peek(i):a=a+1:next:return
  97. 184 a=5376:b=1024:c=2023:fori=btoc:pokei,peek(a):a=a+1:next:gosub840:goto100
  98. 199 rem commands continued ****
  99. 200 ifa$<>"q"then204
  100. 201 gosub990:printp$:input"new increment ";a$:a=int(val(a$)):ifa<1thena=1
  101. 202 ifa>9thena=9
  102. 203 mv=a:gosub990:gosub840:goto100
  103. 204 ifa$<>":"then209
  104. 205 a=ce:a=(a+1)*-(a<15):poke848+cc,a:gosub990:ce=a:poke53280,ce
  105. 206 ifcc=2thenc2=a:gosub840:goto100
  106. 207 ifcc=3thenc3=a:gosub840:goto100
  107. 208 c1=a:gosub840:goto100
  108. 209 ifa$<>"d"then214
  109. 210 a=ce:a=a-1:a=a+((sgn(a)=-1)*(-16)):gosub990:ce=a:poke53280,ce
  110. 211 poke848+cc,a:ifcc=2thenc2=a:gosub840:goto100
  111. 212 ifcc=3thenc3=a:gosub840:goto100
  112. 213 c1=a:gosub840:goto100
  113. 214 ifa$<>"[133]"then216
  114. 215 poke848,1:ce=c1:cc=1:poke53280,ce:gosub990:gosub840:goto100
  115. 216 ifa$<>"[134]"then218
  116. 217 poke848,2:ce=c2:cc=2:poke53280,ce:gosub990:gosub840:goto100
  117. 218 ifa$<>"[135]"then220
  118. 219 poke848,3:ce=c3:cc=3:poke53280,ce:gosub990:gosub840:goto100
  119. 220 ifa$<>"f"then100
  120. 221 gosub990:printp$:input"color# ";a$:a=int(val(a$)):ifa<1ora>3thena=1
  121. 222 poke674,a:gosub990:printp$:input"color value ";a$:a=int(val(a$))
  122. 223 ifa<0ora>15thena=0
  123. 224 poke675,a:sysfl:gosub990:gosub840:goto100
  124. 840 rem print bottom 3 lines *****
  125. 841 gosub990:printp$"num[146]"str$(cc)" col[146] "c$(ce)" "k$"[146] inc[146]"str$(mv);
  126. 842 print" prn[146] "pe$" spe[146] "fs$
  127. 843 print"col1[146] "c$(c1)" col2[146] "c$(c2)" col3[146] "c$(c3)" x[146]"x;
  128. 844 print"y[146]"y
  129. 845 return
  130. 850 rem print new x and y *****
  131. 851 printp$""tab(27)"x[146]          [157][157][157][157][157][157][157][157][157][157]"x"y[146]"y:return
  132. 860 rem move raster up *******
  133. 865 poke3846,0:return
  134. 867 loc.3846 = location to start putting    the normal text at (y coordinate)
  135. 870 rem list commands *****
  136. 872 print"[147]  u  i  0"
  137. 874 print"   [205][194][206]"
  138. 876 print"  j[195][194][195]k   keys to move cursor"
  139. 878 print"   [206][194][205]    ( or use joystick )"
  140. 880 print"  n  m  ,"
  141. 881 print"p = toggles between pen up and pen down"
  142. 882 print"f1,f3,f5 = change to colors 1,2,3"
  143. 883 print": = increment current color"
  144. 884 print"d = decrement current color"
  145. 885 print"- = toggles joystick/key movement"
  146. 886 print"s = save screen"
  147. 887 print"l = load screen"
  148. 888 print"f7,f8 = inc/dec hi-res background color"
  149. 889 print"e = change to erase mode (color 0)"
  150. 890 print"[home] = clears hi-res screen"
  151. 891 print"+ = toggles cursor on/off"
  152. 892 print"f = fills screen with a color"
  153. 893 print"r = reverses screen"
  154. 894 print"q = change cursor increment"
  155. 895 print"\ = toggle fast/slow cursor movement"
  156. 896 print"/,[shift]/ = inc/dec cursor color"
  157. 897 print"^,* = inc/dec text background"
  158. 898 print"x = exits program"
  159. 899 print"hit space bar to return[146]":wait197,32,0:return
  160. 900 rem save sub******
  161. 902 na$="":gosub990
  162. 905 printp$;:input"name of screen    [157][157][157]";na$
  163. 910 printp$;:input"tape or disk (t/d)         [157][157][157][157][157][157][157][157]";dv$
  164. 915 ifna$=""anddv$="d"thenreturn
  165. 920 iflen(na$)>15thenreturn
  166. 921 gosub990
  167. 922 printp$"             plrsse wait               [146]"p$
  168. 925 poke3846,0:ifdv$="t"thend=1:goto927
  169. 926 d=8
  170. 927 poke4611,d:poke4618,len(na$)+1:a=1:na$=na$+"1"
  171. 928 printp$;:fori=1tolen(na$):poke4863+i,asc(mid$(na$,i,1)):next
  172. 929 ifa=1thenpoke4627,4:poke4631,0:poke4639,7:poke4637,127
  173. 931 ifa=2thenpoke4627,32:poke4631,0:poke4639,62:poke4637,0
  174. 933 ifa=3thenpoke4627,216:poke4631,0:poke4639,219:poke4637,127
  175. 935 sys4608:na$=left$(na$,len(na$)-1)
  176. 937 a=a+1:ifa=2thenna$=na$+"2":goto928
  177. 939 ifa=3thenna$=na$+"3":goto928
  178. 941 gosub990:print"":poke3846,226:poke56334,0:return
  179. 950 rem load sub******
  180. 952 na$="":gosub990
  181. 955 printp$;:input"name of screen    [157][157][157]";na$
  182. 960 printp$;:input"tape or disk (t/d)         [157][157][157][157][157][157][157][157]";dv$
  183. 965 ifna$=""anddv$="d"thenreturn
  184. 970 iflen(na$)>15thenreturn
  185. 972 gosub990
  186. 975 printp$"            please wait                [146]"p$;
  187. 976 poke3846,0:ifleft$(dv$,1)="t"thend=1:goto980
  188. 977 d=8
  189. 980 printp$"[145]";:na$=na$+"1":a=1:loadna$,d,1
  190. 981 printp$"[145]";:a=a+1:na$=left$(na$,len(na$)-1):na$=na$+"2":loadna$.d.1
  191. 982 printp$"[145]";:a=a+1:na$=left$(na$,len(na$)-1):na$=na$+"3":loadna$,d,1
  192. 983 poke3846,226:poke56334,0:gosub990:gosub840:goto100
  193. 990 rem clear text *****
  194. 992 fori=1904to2023:pokei,32:next:return
  195. 1000 fori=1to11:readch%(i):next
  196. 1010 b=1:t=0
  197. 1020 reada$:te=val(a$):ifa$="e"then1040
  198. 1025 ifa$="f"then1050
  199. 1030 t=t+te:goto1020
  200. 1040 ift=ch%(b)thenb=b+1:t=0:goto1020
  201. 1045 print"error in data block"b:end
  202. 1050 ift=ch%(b)then1060
  203. 1055 print"error in data block"b:end
  204. 1060 print"data correct, now entering..."
  205. 1065 restore:fori=1to47:reada$:next
  206. 1070 a=864:b=953:gosub1200:a=2048:b=2200:gosub1200:a=2304:b=2468:gosub1200
  207. 1080 a=2560:b=2728:gosub1200:a=2816:b=2932:gosub1200:a=3072:b=3174:gosub1200
  208. 1090 a=3200:b=3237:gosub1200:a=3328:b=3465:gosub1200:a=3584:b=3635:gosub1200
  209. 1100 a=3712:b=3746:gosub1200:a=3840:b=3920:gosub1200
  210. 1150 print"data entered !!!":return
  211. 1200 fori=atob:readt:pokei,t:next:reada$:return
  212. 2999 rem color translate data *****
  213. 3000 datablk,wht,red,cyn,pur,grn,blu,yel,org,brn,lrd,dgr,mgr,lgn,lbl,lgr
  214. 3009 rem joystick array data ******
  215. 3010 data,,,-1,1,,,1,1,-1,-1,,1,1,-1,-1,,,-1,1
  216. 5900 rem checksums *****
  217. 5910 data10078,18217,19331,19145,13292,10587,4275,12661,4922,3396,9730
  218. 6000 rem block 1 *******
  219. 6005 data14,60,3,173,66,3,201,1,240,19,162,0,189,170,3,157,66,3
  220. 6010 data189,178,3,157,84,3,232,224,8,208,239,160,0,132,249,169,32
  221. 6020 data133,250,173,80,3,240,20,201,3,240,19,132,253,162,4,134,254
  222. 6030 data201,1,240,3,76,0,9,76,0,10,76,0,11,132,251,169,216
  223. 6040 data133,252,76,0,8,1,2,4,8,16,32,64,128,254,253,251,247
  224. 6050 data239,223,191,127,e
  225. 6060 rem block 2 *******
  226. 6065 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  227. 6070 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  228. 6080 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  229. 6090 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  230. 6100 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  231. 6110 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,66
  232. 6120 data3,17,249,145,249,202,189,66,3,17,249,145,249,174,63,3,24
  233. 6130 data240,14,165,251,105,40,133,251,144,3,230,252,24,202,208,242,165
  234. 6140 data251,109,62,3,133,251,144,2,230,252,173,83,3,145,251,96,e
  235. 6150 rem block 3 *******
  236. 6155 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  237. 6160 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  238. 6170 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  239. 6180 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  240. 6190 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  241. 6200 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,66
  242. 6210 data3,17,249,145,249,202,189,84,3,49,249,145,249,174,63,3,24
  243. 6220 data240,14,165,253,105,40,133,253,144,3,230,254,24,202,208,242,165
  244. 6230 data253,109,62,3,133,253,144,2,230,254,173,82,3,41,15,141,62
  245. 6240 data3,177,253,41,240,13,62,3,145,253,96,e
  246. 6250 rem block 4 *******
  247. 6255 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  248. 6260 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  249. 6270 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  250. 6280 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  251. 6290 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  252. 6300 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,84
  253. 6310 data3,49,249,145,249,202,189,66,3,17,249,145,249,174,63,3,24
  254. 6320 data240,14,165,253,105,40,133,253,144,3,230,254,24,202,208,242,165
  255. 6330 data253,109,62,3,133,253,144,2,230,254,173,81,3,41,15,10,10
  256. 6340 data10,10,141,62,3,177,253,41,15,13,62,3,145,253,96,e
  257. 6350 rem block 5 *******
  258. 6355 data173,60,3,74,74,74,141,62,3,173,61,3,74,74,74,141,63,3
  259. 6360 data173,61,3,41,7,141,64,3,173,60,3,41,7,141,65,3,169
  260. 6370 data7,56,237,65,3,141,65,3,174,63,3,24,240,16,230,250,165
  261. 6380 data249,105,64,133,249,144,3,230,250,24,202,208,240,174,62,3,240
  262. 6390 data14,165,249,105,8,133,249,144,3,230,250,24,202,208,242,165,249
  263. 6400 data109,64,3,133,249,144,3,230,250,24,174,65,3,160,0,189,84
  264. 6410 data3,49,249,145,249,202,189,84,3,49,249,145,249,96,e
  265. 6420 rem block 6 *******
  266. 6425 data160,0,162,32,142,67,12,232,142,70,12,232,142,73,12,232,142,76
  267. 6430 data12,173,33,208,10,10,10,10,141,176,2,173,33,208,41,15,13
  268. 6440 data176,2,153,0,216,153,0,217,153,0,218,153,232,218,153,0,4
  269. 6450 data153,0,5,153,0,6,153,232,6,200,208,229,152,153,0,60,153
  270. 6460 data0,61,153,0,62,153,0,63,200,208,241,174,67,12,224,60,240
  271. 6470 data15,238,67,12,238,70,12,238,73,12,238,76,12,76,65,12,96,e
  272. 6480 rem block 7 *******
  273. 6485 data160,0,162,32,142,140,12,142,145,12,185,0,32,73,255,153,0,32,200
  274. 6490 data208,245,173,140,12,201,63,240,9,238,140,12,238,145,12,76,138,12,96,e
  275. 6540 rem block 8 *******
  276. 6545 data160,0,173,163,2,174,162,2,224,1,240,20,224,2,240,71,153
  277. 6550 data0,216,153,0,217,153,0,218,153,0,219,200,208,241,96,10,10
  278. 6560 data10,10,141,164,2,185,0,4,41,15,13,164,2,153,0,4,185,0
  279. 6570 data5,41,15,13,164,2,153,0,5,185,0,6,41,15,13,164,2
  280. 6580 data153,0,6,185,232,6,41,15,13,164,2,153,232,6,200,208
  281. 6590 data209,96,141,164,2,185,0,4,41,240,13,164,2,153,0,4,185
  282. 6600 data0,5,41,240,13,164,2,153,0,5,185,0,6,41,240,13,164
  283. 6610 data2,153,0,6,185,232,6,41,240,13,164,2,153,232,6,200,208,209,96,e
  284. 6620 rem block 9 *******
  285. 6625 data169,0,141,167,2,173,0,220,106,176,9,162,2,142,167,2,106
  286. 6630 data76,28,14,106,176,5,162,4,142,167,2,106,176,9,173,167,2
  287. 6640 data105,6,141,167,2,96,106,176,8,173,167,2,105,3,141,167,2,96,e
  288. 6650 rem block 10 *******
  289. 6655 data120,169,15,141,21,3,169,0,141,20,3,141,178,2,141,18,208
  290. 6660 data173,17,208,41,127,141,17,208,173,25,208,9,1,141,25,208,88,96,e
  291. 6670 rem block 11 *******
  292. 6675 data173,178,2,208,37,169,226,141,18,208,169,59,141,17,208,173,192
  293. 6680 data2,141,33,208,169,29,141,24,208,169,24,141,22,208,169,1,141
  294. 6690 data25,208,141,178,2,76,49,234,169,252,141,18,208,169,27,141,17
  295. 6700 data208,173,177,2,141,33,208,169,21,141,24,208,169,8,141,22,208
  296. 6710 data169,1,141,25,208,169,0,141,178,2,76,129,234,f
  297. 6999 rem sprite data ********
  298. 7000 data74,250,85,74,34,73,74,34,65,74,34,65,74,34,65,123,162
  299. 7010 data0,0,0,49,198,68,41,41,68,37,41,68,37,207,84,41,41
  300. 7020 data84,49,41,40,0,0,0,1,196,0,2,4,128,2,4,128,3
  301. 7030 data199,128,2,32,128,1,192,128,0,0,0,0,4,0,0,4,18
  302. 7040 data0,7,146,64,4,158,0,7,130,64,0,14,0,0,0,0,61
  303. 7050 data239,188,37,2,32,61,194,56,33,2,32,33,226,60,0,8,0
  304. 7060 data33,232,64,33,47,64,33,41,64,61,239,120,0,0,0,0,0
  305. 7070 data0,0,0,0,0,0,0,0,37,124,136,37,16,216,61,16,168
  306. 7080 data37,16,136,37,16,136,0,0,0,15,123,192,8,74,64,14,75
  307. 7090 data128,8,74,64,8,122,64,0,0,0,0,0,0,139,232,162,218
  308. 7100 data12,162,171,138,162,138,9,162,138,8,162,139,232,190,0,0,0
  309. 7110 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0
  310. 7120 data64,0,1,240,0,1,16,0,7,28,0,1,16,0,1,240,0
  311. 7130 data0,64,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0
  312. 7140 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  313. 7200 rem save ml data ******
  314. 7210 data169,1,162,8,160,255,32,186,255,169,15,162,0,160,19,32,189,255,169
  315. 7220 data4,133,253,169,0,133,252,169,252,162,127,160,7,32,216,255,96
  316.